package com.luchuan.springbootjasypttest.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.util.Date;

/**
 * extends Model<TestTable> 开启activeRecord
 */
@Data
@TableName("test_table")
public class TestTable extends Model<TestTable> {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Integer intValue;

    @TableField("str_value") //映射数据库中的字段
    private String stringValue;
    private Date timeValue;
    private Date createTime;
    private Date updateTime;
    @TableField(select = false) // 查询时不查出该字段
    private Integer dataStatus;

    @TableField(exist = false) // 数据库中不存在该字段
    private String noExist;
}
